import Vue from 'vue'
import VueRouter from 'vue-router'
// console.log(Index)
Vue.use(VueRouter)
const router = new VueRouter({
  routes: [
    {
      path: '/index',
      // component: Index,
      component: require('../views/index.vue'),
     children: [
      {
        path: 'rage',
        component: require('../views/rage.vue')
      },
      {
        path: 'songList',
        component: require('../views/songList.vue')
      },
      {
        path: 'leaderBoard',
        component: require('../views/leaderBoard.vue')
      },
      {
        path: 'hotSinger',
        component: require('../views/hotSinger.vue')
      }
    ]
  },
   {
    path: '/playListDetail/:id',
    name: 'playListDetail',
    component: require('../views/playListDetail.vue')
  },
  {
    name: 'playerDetail',
    path: '/playerDetail/:id',
    component: require('../views/playerDetail.vue')
  },
  {
    path:'*',
    redirect:'/index/rage'
  }
    
  
  ]
})
export default router
